package com.chexiehui.jc.entity;

import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.TimeUtils;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

//特价车
public class SpecialCarInfo implements Serializable {
    private String Id;
    private String CarId;
    private String CarShopId;
    private String Tel;
    private String ShopName;
    private String Img;
    private String Name;
    private String Price;
    private String OldPrice;
    private String SeriesType;
    private String SeriesTypeMin;
    private String SaleArea;
    private String StartTime;
    private String EndTime;
    private String Adress;
    private double   Lon;
    private double Lat;
    private String OutputType;
    private int Count;
    private String SeriesId;
    private String AgentPrice;
    private boolean DisplayAgentPrice;
    private String BrandName;

    private String Color;
    private String Type;
    private String Source;
    private String Procedures;
    private String Remark;
    private String CreateTime;
    private String ProcessImg;
    private List<String> ProcessImgs;

    private String NewPrice;// (string, optional): 新车价格 ,
    private String SpecialPrice;// (string, optional): 特价 ,
    private List<String> Imgs;// (Array[string], optional): 轮播图 ,
    private String Output;// (string, optional): 排量 ,
    private String GearBoxName;// (string, optional): 变速箱 ,
    private String SeatCount;// (string, optional): 车型的座位个数 ,
    private String SizeType;// (string, optional): 车型尺寸 ,
    private ShopInfo ShopModel;// (CarShopModel, optional): 4S店 ,
    private List<CarBriefliesInfo> CarBrieflies;// (Array[SpecialCarBrieflyInfo], optional): 特价车型款式集合

    public String getBrandName() {
        return BrandName;
    }

    public void setBrandName(String brandName) {
        BrandName = brandName;
    }

    public String getNewPrice() {
        return NewPrice;
    }

    public String getNewPriceStr() {
        return "厂商指导价:" + (StringUtils.isTrimEmpty(NewPrice) ? "无" : NewPrice + "万元");
    }

    public void setNewPrice(String newPrice) {
        NewPrice = newPrice;
    }

    public String getSpecialPrice() {
        return SpecialPrice;
    }

    public String getSpecialPriceStr() {
        return StringUtils.isTrimEmpty(SpecialPrice) ? "暂无报价" : SpecialPrice + "万";
    }

    public void setSpecialPrice(String specialPrice) {
        SpecialPrice = specialPrice;
    }

    public List<String> getImgs() {
        return Imgs;
    }

    public void setImgs(List<String> imgs) {
        Imgs = imgs;
    }

    public String getOutput() {
        return Output;
    }

    public void setOutput(String output) {
        Output = output;
    }

    public String getGearBoxName() {
        return GearBoxName;
    }

    public void setGearBoxName(String gearBoxName) {
        GearBoxName = gearBoxName;
    }

    public String getSeatCount() {
        return SeatCount;
    }

    public void setSeatCount(String seatCount) {
        SeatCount = seatCount;
    }

    public String getSizeType() {
        return SizeType;
    }

    public void setSizeType(String sizeType) {
        SizeType = sizeType;
    }

    public ShopInfo getShopModel() {
        return ShopModel == null ? ShopModel = new ShopInfo() : ShopModel;
    }

    public void setShopModel(ShopInfo shopModel) {
        ShopModel = shopModel;
    }

    public List<CarBriefliesInfo> getCarBrieflies() {
        return CarBrieflies;
    }

    public void setCarBrieflies(List<CarBriefliesInfo> carBrieflies) {
        CarBrieflies = carBrieflies;
    }

    public String getTel() {
        return Tel == null ? "" : Tel;
    }

    public void setTel(String tel) {
        Tel = tel;
    }

    public String getId() {
        return Id == null ? "" : Id;
    }

    public void setId(String id) {
        Id = id;
    }

    public String getCarId() {
        return CarId == null ? "" : CarId;
    }

    public void setCarId(String carId) {
        CarId = carId;
    }

    public String getCarShopId() {
        return CarShopId == null ? "" : CarShopId;
    }

    public void setCarShopId(String carShopId) {
        CarShopId = carShopId;
    }

    public String getImg() {
        return Img == null ? "" : Img;
    }

    public void setImg(String img) {
        Img = img;
    }

    public String getName() {
        return Name == null ? "" : Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public String getPrice() {
        return Price == null ? "" : Price;
    }

    public String getShopName() {
        return ShopName == null ? "" : ShopName;
    }

    public void setShopName(String shopName) {
        ShopName = shopName;
    }

    public String getPriceStr() {
        return StringUtils.isEmpty(Price) ? "" :  Price.equals("暂无报价") ? Price :  Price + "万";
    }

    public void setPrice(String price) {
        Price = price;
    }

    public String getOldPrice() {
        return OldPrice == null ? "" : OldPrice;
    }

    public String getOldPriceStr() {
        return StringUtils.isEmpty(OldPrice) ? "" :  OldPrice.equals("暂无报价") ? OldPrice :  OldPrice + "万";
    }

    public void setOldPrice(String oldPrice) {
        OldPrice = oldPrice;
    }

    public String getSeriesType() {
        return SeriesType == null ? "" : SeriesType;
    }

    public void setSeriesType(String seriesType) {
        SeriesType = seriesType;
    }

    public String getSeriesTypeMin() {
        return SeriesTypeMin == null ? "" : SeriesTypeMin;
    }

    public void setSeriesTypeMin(String seriesTypeMin) {
        SeriesTypeMin = seriesTypeMin;
    }

    public String getStartTime() {
        return StartTime == null ? "" : StartTime;
    }

    public String getAgentPrice() {
        return AgentPrice;
    }
    public String getAgentPriceStr() {
        return DisplayAgentPrice ? ("代理商价格：" + (StringUtils.isEmpty(AgentPrice) ? "未知" : AgentPrice.equals("暂无报价") ? AgentPrice :  AgentPrice + "万")) : "";
    }

    public void setAgentPrice(String agentPrice) {
        AgentPrice = agentPrice;
    }

    public String getStartEndTimeStr() {
        if(!getStartTime().equals("") && !getEndTime().equals("")){
            Date ds= TimeUtils.string2Date(StartTime);
            if(ds == null){
                return "";
            }
            Date de= TimeUtils.string2Date(EndTime);
            if(de == null){
                return "";
            }
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
            return TimeUtils.date2String(ds, sdf) + "-" + TimeUtils.date2String(de, sdf);
        }
        return  "";
    }

    public void setStartTime(String startTime) {
        StartTime = startTime;
    }

    public String getEndTime() {
        return Id == null ? "" : Id;
    }

    public void setEndTime(String endTime) {
        EndTime = endTime;
    }

    public String getAdress() {
        return Adress == null ? "" : Adress;
    }

    public void setAdress(String adress) {
        Adress = adress;
    }

    public double getLon() {
        return Lon;
    }

    public void setLon(double lon) {
        Lon = lon;
    }

    public double getLat() {
        return Lat;
    }

    public void setLat(double lat) {
        Lat = lat;
    }

    public String getOutputType() {
        return OutputType == null ? "" : OutputType;
    }

    public void setOutputType(String outputType) {
        OutputType = outputType;
    }

    public int getCount() {
        return Count;
    }

    public void setCount(int count) {
        Count = count;
    }

    public String getSeriesId() {
        return SeriesId == null ? "" : SeriesId;
    }

    public void setSeriesId(String seriesId) {
        SeriesId = seriesId;
    }

    public String getColor() {
        return Color == null ? "" : Color;
    }

    public void setColor(String color) {
        Color = color;
    }

    public String getType() {
        return Type == null ? "" : Type;
    }

    public void setType(String type) {
        Type = type;
    }

    public String getSource() {
        return Source == null ? "" : Source;
    }

    public void setSource(String source) {
        Source = source;
    }

    public String getProcedures() {
        return Procedures == null ? "" : Procedures;
    }

    public void setProcedures(String procedures) {
        Procedures = procedures;
    }

    public String getRemark() {
        return Remark == null ? "" : Remark;
    }

    public void setRemark(String remark) {
        Remark = remark;
    }

    public String getCreateTime() {
        return CreateTime == null ? "" : CreateTime;
    }

    public void setCreateTime(String createTime) {
        CreateTime = createTime;
    }

    public String getSaleArea() {
        return SaleArea == null ? "" : SaleArea;
    }

    public void setSaleArea(String saleArea) {
        SaleArea = saleArea;
    }

    public String getProcessImg() {
        return ProcessImg;
    }

    public void setProcessImg(String processImg) {
        ProcessImg = processImg;
    }

    public List<String> getProcessImgs() {
        return ProcessImgs;
    }

    public void setProcessImgs(List<String> processImgs) {
        ProcessImgs = processImgs;
    }
}
